/*
Emily Huddart Kennedy	
Proposal title: Accidental Environmentalists: Examining the Effect of Income on Positive Social Evaluations of Environmentally-Friendly Lifestyles


HYPOTHESES

Stated-Hyp1: People will react more positively to high than low-income households. (p. 3)

	Test-Hyp1: People will have higher social approval of high-income vs. low-income households
	Test-Hyp2: People will have higher social closeness towards high-income vs. low-income households
	Test-Hyp3: People will have higher perception of morality of high-income vs. low-income households
	Test-Hyp4: People will have higher perception of competence of high-income vs. low-income households
	Test-Hyp5: People will have higher perception of environmental commitment of high-income vs. low-income households

	Stated-Hyp2: People will react more positively to green than non-green households.

	Test-Hyp6: People will have higher social approval of green vs. non-green households 
	Test-Hyp7: People will have higher social closeness towards green vs. non-green households 
	Test-Hyp8: People will have higher perception of morality of green vs. non-green households 
	Test-Hyp9: People will have higher perception of competence of green vs. non-green households 
	Test-Hyp10: People will have higher perception of environmental commitment of green vs. non-green households 
	
Stated-Hyp3: Household income and behavior will interact such that the positive effect of green behavior will be larger for high-income than low-income households.

	Test-Hyp11: The effect of greenness on social approval will be higher for high-income households. 
	Test-Hyp12: The effect of greenness on social closeness will be higher for high-income households. 
	Test-Hyp13: The effect of greenness on perception will be higher for high-income households. 
	Test-Hyp14: The effect of greenness on perception will be higher for high-income households. 
	Test-Hyp15: The effect of greenness on perception will be higher for high-income households. 

********************************************************************************
* NOTES

The proposal mentions plans to control for the following variables: 
- respondent's environmental concern
- age
- income
- education
- race
- gender
- political ideology
- political party preference
	
*/

clear all
use "Kennedy1017.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATION

	* household efforts to reduce environmental impact
		gen treat_green=1 if P_TESS23==2|P_TESS23==4
		replace treat_green=0 if P_TESS23==1|P_TESS23==3

		tab treat_green, mis
		
	* income group of household
		* there was a manipulation for this in the original survey but it's missing from data file
		gen treat_rich=0 if P_TESS23<=2
		replace treat_rich=1 if P_TESS23==3|P_TESS23==4
		
		tab treat_rich, mis
	
* OUTCOME MEASURES

	* social approval
		clonevar approval = Q1
		
	* perception of social closeness
		clonevar socclose= Q2 // this is a weird measure of closeness 

	* perception of positive evaluation of morality
		clonevar morality=Q4

	* perception of competence 
		clonevar competence = Q3

	* perception of environmental commitment
		clonevar envcommit= Q5

		foreach var in approval socclose morality competence envcommit {
		replace `var'=. if `var'>10
		tab `var', mis
		}
	
* CONTROLS (mentioned on page 4)
	/* measure of environmental concern:
	Generally speaking, how concerned are you about environmental issues?
	*/
	tab Q8
	replace Q8=. if Q8>5 // recode missing
	gen r_envconcern = 6-Q8
	tab r_envconcern, mis
	
* age
	tab AGE
	
* income
	tab INCOME
	
* education
	tab EDUC4

* race
	tab RACETHNICITY
	// recoding because there are too many categories
	lab def raceeth 1 "white" 2 "black" 3 "hispanic" 4 "other"
	recode RACETHNICITY (1=1) (2=2) (4=3) (3=4) (5/6=4), gen(raceeth)
	lab val raceeth raceeth
	tab raceeth
		
* gender
	tab GENDER
	
* political ideology
	tab IDEO
	// exclude last category: haven't thought much
	gen ideology = IDEO
	replace ideology=. if IDEO==8
	tab ideology

* political party preference	
	tab PartyID5
	
********************************************************************************

* ANALYSIS 
	
	// bonferonni correction needed for all tests. test threshold is:
	di 0.05/5
	
	
*Test-Hyp1: People will have higher social approval of high-income vs. low-income households
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg approval i.treat_rich `controls'
	// reject. p=0.290
	tess 1.treat_rich +, init(Kennedy1017) bonf(5)
	
*Test-Hyp2: People will have higher social closeness towards high-income vs. low-income households
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg socclose i.treat_rich `controls'
	// reject. p=0.347	
	tess 1.treat_rich +, bonf(5)
	
*Test-Hyp3: People will have higher perception of morality of high-income vs. low-income households
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg morality i.treat_rich `controls'
	// reject. p=0.906
	tess 1.treat_rich +, bonf(5)
	
*Test-Hyp4: People will have higher perception of competence of high-income vs. low-income households
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg competence i.treat_rich `controls'
	// do not reject. p=0.000
	tess 1.treat_rich +, bonf(5)	
	
*Test-Hyp5: People will have higher perception of environmental commitment of high-income vs. low-income households
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg envcommit i.treat_rich `controls'
	// do not reject. p=0.000
	tess 1.treat_rich +, bonf(5)	

*Test-Hyp6: People will have higher social approval of green vs. non-green households 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg approval i.treat_green `controls'
	// do not reject. p=0.002
	tess 1.treat_green +, bonf(5)
		
*Test-Hyp7: People will have higher social closeness towards green vs. non-green households 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg socclose i.treat_green `controls'
	// do not reject. p=0.000
	tess 1.treat_green +, bonf(5)
	
*Test-Hyp8: People will have higher perception of morality of green vs. non-green households 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg morality i.treat_green `controls'
	// do not reject. p=0.000
	tess 1.treat_green +, bonf(5)		
		
		
*Test-Hyp9: People will have higher perception of competence of green vs. non-green households 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg competence i.treat_green `controls'
	// do not reject. p=0.000 
	tess 1.treat_green +, bonf(5)		
		
*Test-Hyp10: People will have higher perception of environmental commitment of green vs. non-green households 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg envcommit i.treat_green `controls'
	// do not reject. p=0.000
	tess 1.treat_green +, bonf(5)		
		
*Test-Hyp11: The effect of greenness on social approval will be higher for high-income households. 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg approval i.treat_rich##i.treat_green `controls'
	// reject. p=0.537
	tess 1.treat_rich#1.treat_green +, bonf(5)
	
*Test-Hyp12: The effect of greenness on social closeness will be higher for high-income households. 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg socclose i.treat_rich##i.treat_green `controls'
	// reject. p=0.937
	tess 1.treat_rich#1.treat_green +, bonf(5)
	
*Test-Hyp13: The effect of greenness on perception of morality will be higher for high-income households. 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg morality i.treat_rich##i.treat_green `controls'
	// reject. p=0.204
	tess 1.treat_rich#1.treat_green +, bonf(5)
	
*Test-Hyp14: The effect of greenness on perception of competence will be higher for high-income households. 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg competence i.treat_rich##i.treat_green `controls'
	// reject. p=0.017 [bonferroni correction]
	tess 1.treat_rich#1.treat_green +, bonf(5)
	
*Test-Hyp15: The effect of greenness on perception of environmental concern will be higher for high-income households. 
	local controls r_envconcern AGE i.INCOME i.EDUC4 GENDER i.raceeth IDEO PartyID5 
	reg envcommit i.treat_rich##i.treat_green `controls'
	// do not reject. p=0.000
	tess 1.treat_rich#1.treat_green +, bonf(5)
	
